<%-- 
    Document   : index
    Created on : Oct 7, 2011, 9:00:23 PM
    Author     : Nguyen Thi Thu Huong
--%>

<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<%
	String strFun = request.getParameter("f");
	//User user = (User)request.getSession().getAttribute("loggedUser");
        Object user = request.getSession().getAttribute("loggedUser");
	int functCode = strFun==null?0:Integer.parseInt(strFun);
        
	switch(functCode)
	{
		case 0: //trang chu
			%>
				<tiles:insertDefinition name=".mainTemplate"></tiles:insertDefinition>
			<%
		break;
			
		case 1: //trang dang nhap
			%>
                            <tiles:insertDefinition name=".login"></tiles:insertDefinition>
			<%
		break;
			
		case 2: //trang dang ky
			%>
			<tiles:insertDefinition name=".reg"></tiles:insertDefinition>
			<%
		break;
			
		case 3: 
			%>
			<tiles:insertDefinition name=".tingiamgia"></tiles:insertDefinition>
			<%
		break;
			
		case 4: 
			%>
			<tiles:insertDefinition name=".chovoucher"></tiles:insertDefinition>
			<%
		break;
			
		case 5: 
			%>
			<tiles:insertDefinition name=".chothoitrang"></tiles:insertDefinition>
			<%
		break;
			
		case 6: 
			%>
			<tiles:insertDefinition name=".chiase"></tiles:insertDefinition>
			<%
		break;
                
                case 7: 
			%>
			<tiles:insertDefinition name=".diemden"></tiles:insertDefinition>
			<%
		break;
		
                case 8: 
			%>
			<tiles:insertDefinition name=".canban_voucher"></tiles:insertDefinition>
			<%
		break;
                
		default:
			%>
			<tiles:insertDefinition name=".mainTemplate"></tiles:insertDefinition>
			<%
		break;
	}
	%>
